package com.zsr.xmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zsr.common.utils.PageUtils;
import com.zsr.common.vo.product.SkuItemVO;
import com.zsr.common.entity.product.SkuInfoEntity;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * sku信息
 *
 * @author zsrey
 * @email zsrey8880@163.com
 * @date 2022-06-09 23:33:50
 */
public interface SkuInfoService extends IService<SkuInfoEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveSkuInfo(SkuInfoEntity skuInfoEntity);

    /**
     * 条件查询列表
     *
     * @param params
     * @return
     */
    PageUtils queryPageByCondition(Map<String, Object> params);

    /**
     * 根据spuId查询sku
     *
     * @param spuId
     * @return
     */
    List<SkuInfoEntity> getSkusBySpuId(Long spuId);

    /**
     * 查询商品详情
     *
     * @param skuId
     * @return
     */
    SkuItemVO item(Long skuId) throws ExecutionException, InterruptedException;
}

